/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.api.wrapper.website.user;

import java.math.BigDecimal;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.opsli.api.base.warpper.ApiWrapper;
import org.opsli.common.annotation.validator.Validator;
import org.opsli.common.annotation.validator.ValidatorLenMax;
import org.opsli.common.annotation.validator.ValidatorLenMin;
import org.opsli.common.enums.ValidatorType;
import org.opsli.plugins.excel.annotation.ExcelInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
* 用户管理 Model
*
* @author cyx
* @date 2025-07-07 15:41:55
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class UserModel extends ApiWrapper {

    /** 学号（唯一） */
    @Schema(description = "学号（唯一）")
    @ExcelProperty(value = "学号（唯一）", order = 1)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(20)
    private String studentId;

    /** 用户姓名 */
    @Schema(description = "用户姓名")
    @ExcelProperty(value = "用户姓名", order = 2)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(50)
    private String name;

    /** 用户角色 */
    @Schema(description = "用户角色")
    @ExcelProperty(value = "用户角色", order = 3)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(5)
    private String role;

    /** 认证状态 */
    @Schema(description = "认证状态")
    @ExcelProperty(value = "认证状态", order = 4)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(10)
    private String authStatus;

    /** 教务系统密码（加密存储，可为空） */
    @Schema(description = "教务系统密码（加密存储，可为空）")
    @ExcelProperty(value = "教务系统密码（加密存储，可为空）", order = 5)
    @ExcelInfo
    @ValidatorLenMax(100)
    private String eduPassword;

    /** 本系统密码（加密存储，必填） */
    @Schema(description = "本系统密码（加密存储，必填）")
    @ExcelProperty(value = "本系统密码（加密存储，必填）", order = 6)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(100)
    private String password;

    /** 邮箱（可选） */
    @Schema(description = "邮箱（可选）")
    @ExcelProperty(value = "邮箱（可选）", order = 7)
    @ExcelInfo
    @ValidatorLenMax(100)
    private String email;

    /** 手机号（可选） */
    @Schema(description = "手机号（可选）")
    @ExcelProperty(value = "手机号（可选）", order = 8)
    @ExcelInfo
    @ValidatorLenMax(20)
    private String phone;

    /** 注册时间 */
    @Schema(description = "注册时间")
    @ExcelProperty(value = "注册时间", order = 9)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createdTime;



}